From 9bec2359e659b6a5e0d49df9e5723d837e1ca8df Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Tue, 9 Jan 2007 17:43:13 +0000 Subject: [PATCH] [HVM] Ignore evtchn_upcall_mask and initialise to zero. Signed-off-by: Keir Fraser --- tools/libxc/xc_hvm_build.c | 3 +-- xen/arch/x86/hvm/irq.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xc_hvm_build.c b/tools/libxc/xc_hvm_build.c index 21e20ffaf9..8c0c52238b 100644 --- a/tools/libxc/xc_hvm_build.c +++ b/tools/libxc/xc_hvm_build.c @@ -233,8 +233,7 @@ static int setup_guest(int xc_handle, SCRATCH_PFN)) == NULL) ) goto error_out; memset(shared_info, 0, PAGE_SIZE); - for ( i = 0; i < MAX_VIRT_CPUS; i++ ) - shared_info->vcpu_info[i].evtchn_upcall_mask = 1; + /* NB. evtchn_upcall_mask is unused: leave as zero. */ memset(&shared_info->evtchn_mask[0], 0xff, sizeof(shared_info->evtchn_mask)); munmap(shared_info, PAGE_SIZE); diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index 1b51f5905c..45d4f97042 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -135,7 +135,8 @@ void hvm_set_callback_irq_level(void) if ( gsi == 0 ) goto out; - if ( local_events_need_delivery() ) + /* NB. Do not check the evtchn_upcall_mask. It is not used in HVM mode. */ + if ( vcpu_info(v, evtchn_upcall_pending) ) { if ( !__test_and_set_bit(0, &hvm_irq->callback_irq_wire) && (hvm_irq->gsi_assert_count[gsi]++ == 0) ) -- 2.30.2